package com.longge;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: my-code
 * @description:
 * @author: longge
 * @create: 2021-03-08 23:42
 */
public class KidsWithCandies {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        List<Boolean> res = new ArrayList<>();
        int max = 0;
        for (int candy : candies) {
           max= Math.max(max, candy);
        }
        for (int candy : candies) {
            res.add(candy+extraCandies>=max);
        }
        return res;
    }
}
